package com.wangyadong.hobby.schedule.jobtask.javathread3.chapter2;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

public class MyRejectExecutionHandler implements RejectedExecutionHandler {


    /**
     * 打印丢弃的任务
     * @param r
     * @param executor
     */
    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        System.out.println(""+r.toString());
    }
}
